/////////////////////////////////////////////////////////////////////////////
// This file is part of the "Java-DAP" project, a Java implementation
// of the OPeNDAP Data Access Protocol.
//
// Copyright (c) 2007 OPeNDAP, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
/////////////////////////////////////////////////////////////////////////////
using System;
using NDODS.DAP.BaseTypes;

namespace NDODS.DAP
{
    /// <summary> A Factory for BaseType objects. The DDS parser must implement this
    /// interface so that specific instances of <code>DByte</code>, and other
    /// <code>BaseType</code>s, can be created.
    /// <p/>
    /// DDS and its parser will use this interface to create specific instances of
    /// the various data type classes in OPeNDAP. There is an implementation of this
    /// interface which creates instances of the <code>DByte</code>, etc. classes.
    /// If a new set of classes are defined (e.g. <code>NC_Byte</code>, etc.) this
    /// interface should be implemented for those classes such that the methods
    /// return instances of the appropriate types.
    /// 
    /// </summary>
    /// <author>  jehamby
    /// </author>
    /// <version>  $Revision: 15901 $
    /// </version>
    /// <seealso cref="BaseType">
    /// </seealso>
    /// <seealso cref="DefaultFactory">
    /// </seealso>
    /// <seealso cref="DDS">
    /// </seealso>
    public interface IBaseTypeFactory
    {
        /// <summary> Construct a new BaseType with type as specified by the type string.</summary>
        /// <returns> the new BaseType
        /// </returns>
        //   public BaseType newBaseType(String typeString);
        /// <summary> Construct a new BaseType with name n and
        /// with type as specified by the typeString.
        /// </summary>
        /// <returns> the new BaseType
        /// </returns>
        //   public BaseType newBaseType(String typeString, String n);
        //------------------------------------
        /// <summary> Construct a new DByte.
        /// 
        /// </summary>
        /// <returns> the new DByte
        /// </returns>
        DByte newDByte();

        /// <summary> Construct a new DByte with name n.
        /// 
        /// </summary>
        /// <param name="n">the variable name
        /// </param>
        /// <returns> the new DByte
        /// </returns>
        DByte newDByte(String n);

        //------------------------------------

        /// <summary> Construct a new DInt16.
        /// 
        /// </summary>
        /// <returns> the new DInt16
        /// </returns>
        DInt16 newDInt16();

        /// <summary> Construct a new DInt16 with name n.
        /// 
        /// </summary>
        /// <param name="n">the variable name
        /// </param>
        /// <returns> the new DInt16
        /// </returns>
        DInt16 newDInt16(String n);

        //------------------------------------

        /// <summary> Construct a new DUInt16.
        /// 
        /// </summary>
        /// <returns> the new DUInt16
        /// </returns>
        DUInt16 newDUInt16();

        /// <summary> Construct a new DUInt16 with name n.
        /// 
        /// </summary>
        /// <param name="n">the variable name
        /// </param>
        /// <returns> the new DUInt16
        /// </returns>
        DUInt16 newDUInt16(String n);

        //------------------------------------

        /// <summary> Construct a new DInt32.
        /// 
        /// </summary>
        /// <returns> the new DInt32
        /// </returns>
        DInt32 newDInt32();

        /// <summary> Construct a new DInt32 with name n.
        /// 
        /// </summary>
        /// <param name="n">the variable name
        /// </param>
        /// <returns> the new DInt32
        /// </returns>
        DInt32 newDInt32(String n);

        //------------------------------------

        /// <summary> Construct a new DUInt32.
        /// 
        /// </summary>
        /// <returns> the new DUInt32
        /// </returns>
        DUInt32 newDUInt32();

        /// <summary> Construct a new DUInt32 with name n.
        /// 
        /// </summary>
        /// <param name="n">the variable name
        /// </param>
        /// <returns> the new DUInt32
        /// </returns>
        DUInt32 newDUInt32(String n);

        //------------------------------------

        /// <summary> Construct a new DFloat32.
        /// 
        /// </summary>
        /// <returns> the new DFloat32
        /// </returns>
        DFloat32 newDFloat32();

        /// <summary> Construct a new DFloat32 with name n.
        /// 
        /// </summary>
        /// <param name="n">the variable name
        /// </param>
        /// <returns> the new DFloat32
        /// </returns>
        DFloat32 newDFloat32(String n);

        //------------------------------------

        /// <summary> Construct a new DFloat64.
        /// 
        /// </summary>
        /// <returns> the new DFloat64
        /// </returns>
        DFloat64 newDFloat64();

        /// <summary> Construct a new DFloat64 with name n.
        /// 
        /// </summary>
        /// <param name="n">the variable name
        /// </param>
        /// <returns> the new DFloat64
        /// </returns>
        DFloat64 newDFloat64(String n);

        //------------------------------------

        /// <summary> Construct a new DString.
        /// 
        /// </summary>
        /// <returns> the new DString
        /// </returns>
        DString newDString();

        /// <summary> Construct a new DString with name n.
        /// 
        /// </summary>
        /// <param name="n">the variable name
        /// </param>
        /// <returns> the new DString
        /// </returns>
        DString newDString(String n);

        //------------------------------------

        /// <summary> Construct a new DURL.
        /// 
        /// </summary>
        /// <returns> the new DURL
        /// </returns>
        DURL newDURL();

        /// <summary> Construct a new DURL with name n.
        /// 
        /// </summary>
        /// <param name="n">the variable name
        /// </param>
        /// <returns> the new DURL
        /// </returns>
        DURL newDURL(String n);

        //------------------------------------

        /// <summary> Construct a new DArray.
        /// 
        /// </summary>
        /// <returns> the new DArray
        /// </returns>
        DArray newDArray();

        /// <summary> Construct a new DArray with name n.
        /// 
        /// </summary>
        /// <param name="n">the variable name
        /// </param>
        /// <returns> the new DArray
        /// </returns>
        DArray newDArray(String n);

        //------------------------------------


        /// <summary> Construct a new DGrid.
        /// 
        /// </summary>
        /// <returns> the new DGrid
        /// </returns>
        DGrid newDGrid();

        /// <summary> Construct a new DGrid with name n.
        /// 
        /// </summary>
        /// <param name="n">the variable name
        /// </param>
        /// <returns> the new DGrid
        /// </returns>
        DGrid newDGrid(String n);

        //------------------------------------

        /// <summary> Construct a new DStructure.
        /// 
        /// </summary>
        /// <returns> the new DStructure
        /// </returns>
        DStructure newDStructure();

        /// <summary> Construct a new DStructure with name n.
        /// 
        /// </summary>
        /// <param name="n">the variable name
        /// </param>
        /// <returns> the new DStructure
        /// </returns>
        DStructure newDStructure(String n);

        //------------------------------------

        /// <summary> Construct a new DSequence.
        /// 
        /// </summary>
        /// <returns> the new DSequence
        /// </returns>
        DSequence newDSequence();

        /// <summary> Construct a new DSequence with name n.
        /// 
        /// </summary>
        /// <param name="n">the variable name
        /// </param>
        /// <returns> the new DSequence
        /// </returns>
        DSequence newDSequence(String n);
    }
}